Replace the line breaks contained in the strings in textarea with the javascript code on the first floor of & amp; lt; br & amp; gt;
Textarea. value. replace (/\ n/g ,"
");
2nd floor
S = textarea. value. replace (/\ r \ n/g ,"
");
Third
TextArea Line Change
TextArea is saved to the MySQL database when using inline editing in the DataGrid in Easyui \ nEnter a return character in the textarea the value in the JS read textarea has \ r \ n then to the business layer conversion to
BackgroundLook at the outdated information, spend a lot of time, but also have a harvest, or write it!AnalysisSome students may want to enter the help text directly in the tag, but there is a new problem-because set the default content, if the
This article mainly introduces how to use str_replace in php to replace the br with the carriage return in the input box, and how to replace \ n with the br. For more information, see
This article describes how to use str_replace in php to replace
This article mainly introduces how to use str_replace in php to replace the br with the carriage return in the input box, and how to replace \ n with the br, if you want to use str_replace in php, you can refer to the following example to illustrate
Sometimes when we do form submission, we often need to save the HTML tag, but textarea does not save the line-wrapping information, so we need to use JS to save textarea and other HTM tags.Really let the HTML text box in the form of exchange and
How can we display this text? in textarea, we need a line feed format & lt; html & gt; & lt; body & gt; & lt; textarea & nbsp; id = "tx" & nbsp; rows = 50 & nbsp; cols = 200 & gt; & lt;/textarea & gt; & lt;/body & gt; & lt; /html: how to display
Today, when I wrote a recruitment system, I found that I directly submitted the content to the database in our original format, and there were no line breaks or spaces in the first line, for details, see the original
Today, when I wrote a
Replace the carriage return in textarea. Replace the carriage return in textarea with the br. when I wrote a recruitment system today, I found that I submitted the content directly to the database in our original format, replace the carriage return
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.